package com.blb.mvc.entity;

/**
 * 响应格式
 */
public class ResponseResult {

    //响应代码
    private Integer code;

    //响应数据
    private Object data;

    public ResponseResult(Integer code, Object data) {
        this.code = code;
        this.data = data;
    }

    public ResponseResult() {
    }

    //正常响应
    public static ResponseResult ok(Object data){
        return new ResponseResult(200,data);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
